unit Unit4;

interface

procedure WriteToGlobalLog ( s: string );
procedure SaveGlobalLog ( s: string );
procedure ClearGlobalLog;

var
   ofdCSVfile,
   ofdString: string;

implementation

uses
   System.SysUtils, System.DateUtils, System.Types, System.Classes, System.Generics.Collections, System.Generics.Defaults, System.Math;

var
   l: TStringList;

procedure WriteToGlobalLog ( s: string );
begin
   l.Add ( DateTimeToStr ( Now ) + '   ' + s );
end;

procedure SaveGlobalLog ( s: string );
begin
   if l.Count > 0 then l.SaveToFile ( s );
end;

procedure ClearGlobalLog;
begin
   l.Clear;
end;

begin
   l := TStringList.Create;
   ofdCSVfile := '';
   ofdString := '';
end.
